using Unity.Entities;
using UnityEngine;

namespace DOTS.DOD.LESSON6
{
    struct NextPathIndex : IComponentData
    {
        public uint NextIndex;
    }

    public class NextPathIndexAuthoring : MonoBehaviour
    {
        [HideInInspector] public uint NextIndex;

        class Baker : Baker<NextPathIndexAuthoring>
        {
            public override void Bake(NextPathIndexAuthoring authoring)
            {
                var entity = GetEntity(TransformUsageFlags.None);
                AddComponent(entity, new NextPathIndex()
                {
                    NextIndex = authoring.NextIndex,
                });
            }
        }
    }
}